package org.maxkey.portal.core.cam;


import org.maxkey.portal.core.authentication.CurrentAccount;

/**
 * @author : lqf
 * @description : 用于存储用户信息
 * @date : Create in 10:47 2018/6/04
 */
public class CurrentThreadLocal {

    private CurrentThreadLocal(){
    }
    private static final ThreadLocal<CurrentAccount> LOCAL = new ThreadLocal<CurrentAccount>();

    public static void set(CurrentAccount user){
        LOCAL.set(user);
    }

    public static CurrentAccount get(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }
}